package com.zhangzeqin.code.controller;

import com.zhangzeqin.code.service.Impl.TimeServiceImpl;
import com.zhangzeqin.code.service.TimeService;

import java.sql.SQLException;

public class TimeController {
    /**
     * 实例化一个TimeService对象
     */
    TimeService timeService=new TimeServiceImpl();

    /**
     * 获得用户原有的学习时长
     */
    public double getTime() throws SQLException{
       return timeService.getTime();
    }



    /**
     * 更新用户学习时长
     */
    public boolean updateTime(long startTime,long endTime){
        return timeService.updateTime(startTime,endTime);
    }
}
